package com.zzyl.nursing.task;

import com.zzyl.nursing.service.IContractService;
import com.zzyl.nursing.service.IReservationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class ContractJob {
    @Resource
    private IContractService contractService;

    @Resource
    private IReservationService reservationService;

    public void updateContractStatusJob() {
        contractService.updateContractStatus();
        log.info("定时更新合同状态成功！");
    }

    public void  updateReservationStatus(){
        reservationService.updateReservationStatus();
        log.info("定时更新预约状态成功！");
    }
}
